package com.service2.controller

import com.base.model.service2.Model_Service2
import com.base.service.IRPC_Service2_Feign
import com.yfree.global.YController
import io.seata.spring.annotation.GlobalTransactional
import org.springframework.beans.factory.annotation.Value
import org.springframework.cloud.context.config.annotation.RefreshScope
import org.springframework.web.bind.annotation.RestController

@RefreshScope
@RestController
class Controller_Service2(
    @Value("\${server.port}") var serverPort: String
) : YController(), IRPC_Service2_Feign {
    @GlobalTransactional
    override fun index(): String {
        return yResult(
            result = listOf(
                Model_Service2("Feign:Server2Port:$serverPort")
            )
        )
    }
}
